<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>成员管理</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/style.css"/>
		<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
		<link rel="stylesheet" href="__INDEX__/css/mall.css" />
	</head>
	<body>
		<header class="mui-bar mui-bar-nav">
		    <a class="mui-icon mui-icon-left-nav mui-pull-left"  id="return" href="JavaScript:history.go(-1)"></a>
		    <h1 class="mui-title">成员管理</h1>		    
		</header>
		<div class="mui-content">
			<div class="fjysq_cylisbox">
				{volist name='memberlist' id='vo' empty="$empty"}
				<div class="fj_cyitem">
					<div class="fj_cyitem_top">
						<div class="fj_cydw">
							<span class="iconfont icon-dingwei"></span>
							<span>{$vo.id}</span>
						</div>
						<div class="fj_cybtn">
							<a href="javascript:;" onclick="yichu('{$vo.id}')">
							<span class="iconfont icon-shanchu"></span>
							<span>移除</span>
							</a>
							{if condition="$vo.state == 1"}
								<a href="javascript:;" style="margin-left: 20px;">
								<span class="iconfont icon-record"></span>
								<span>已通过</span>
								</a>
							{else /}
								<a href="javascript:;" onclick="membershenhe('{$vo.id}')" style="margin-left: 20px;">
								<span class="iconfont icon-record"></span>
								<span>未审核,去审核</span>
								</a>
							{/if}
							
						</div>
					</div>
					<div class="fj_cyinfobox clearfix">
						<div class="fj_cytoux"><img src="{$vo.thumb}"></div>
						<div class="fj_cyinfo">
							<a href="{:url('index/shop_info',['agent_id'=>$vo.agent_id])}">
							<div class="fj_cynambox">
								<span class="fj_cynam">{$vo.store_name}</span>
								<span class="fj_cylevel">客户量：{$vo.customer_volume}个</span>
							</div>
							<p class="fj_cystyle">创建时间:{$vo.add_time}</p>
							<p>店铺地址： {$vo.address}</p>
							</a>
						</div>
						
					</div>
				</div>
				{/volist}
			</div>
		</div>
	</body>
</html>
{include file="public/footer" /}
<script type="text/javascript">
$('#return').click(function() {
	window.location.href = "{:url('member/union')}";
});
function yichu(id){
	layer.confirm('您确定要移除吗？', {
		btn: ['确定', '取消'] //按钮
	}, function() {
		$.ajax({
			url: "{:url('member/yichu')}",
			data: {
				id:id
			},
			success: function(data) {
				if(data.code==200){
                	layer.msg('移除成功', {
					  icon: 1,
					  time: 1500 //2秒关闭（如果不配置，默认是3秒）
					}, function(){
						location.href = "{:url('member/union')}";
					});
                }else{
                	layer.msg('移除失败！');
                }
			}
		})
	})
};
function membershenhe(id){
	layer.confirm('您确定要审核吗？', {
		btn: ['确定', '取消'] //按钮
	}, function() {
		$.ajax({
			url: "{:url('member/membershenhe')}",
			data: {
				id:id
			},
			success: function(data) {
				if(data.code==200){
                	layer.msg('审核成功', {
					  icon: 1,
					  time: 1500 //2秒关闭（如果不配置，默认是3秒）
					}, function(){
						location.href = "{:url('member/union')}";
					});
                }else{
                	layer.msg('审核失败！');
                }
			}
		})
	})
};
</script>